home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / util / Mac F2C 1.3.sit / Mac F2C 1.3 / Mac F2C Libraries / libF77 Sources / README < prev    next >
Text File  |  1995-01-28  |  4KB  |  95 lines

  1. If your compiler does not recognize ANSI C headers,
  2. compile with KR_headers defined:  either add -DKR_headers
  3. to the definition of CFLAGS in the makefile, or insert
  4.  
  5. #define KR_headers
  6.  
  7. at the top of f2c.h , cabs.c , main.c , and sig_die.c .
  8.  
  9. Under MS-DOS, compile s_paus.c with -DMSDOS.
  10.  
  11. If you have a really ancient K&R C compiler that does not understand
  12. void, add -Dvoid=int to the definition of CFLAGS in the makefile.
  13.  
  14. If you use a C++ compiler, first create a local f2c.h by appending
  15. f2ch.add to the usual f2c.h, e.g., by issuing the command
  16.     make f2c.h
  17. which assumes f2c.h is installed in /usr/include .
  18.  
  19. If your system lacks onexit() and you are not using an ANSI C
  20. compiler, then you should compile main.c, s_paus.c, s_stop.c, and
  21. sig_die.c with NO_ONEXIT defined.  See the comments about onexit in
  22. the makefile.
  23.  
  24. If your system has a double drem() function such that drem(a,b)
  25. is the IEEE remainder function (with double a, b), then you may
  26. wish to compile r_mod.c and d_mod.c with IEEE_drem defined.
  27. On some systems, you may also need to compile with -Ddrem=remainder .
  28.  
  29. To check for transmission errors, issue the command
  30.     make check
  31. This assumes you have the xsum program whose source, xsum.c,
  32. is distributed as part of "all from f2c/src".  If you do not
  33. have xsum, you can obtain xsum.c by sending the following E-mail
  34. message to netlib@research.att.com
  35.     send xsum.c from f2c/src
  36.  
  37. The makefile assumes you have installed f2c.h in a standard
  38. place (and does not cause recompilation when f2c.h is changed);
  39. f2c.h comes with "all from f2c" (the source for f2c) and is
  40. available separately ("f2c.h from f2c").
  41.  
  42. Most of the routines in libF77 are support routines for Fortran
  43. intrinsic functions or for operations that f2c chooses not
  44. to do "in line".  There are a few exceptions, summarized below --
  45. functions and subroutines that appear to your program as ordinary
  46. external Fortran routines.
  47.  
  48. 1.    CALL ABORT prints a message and causes a core dump.
  49.  
  50. 2.    ERF(r) and DERF(d) and the REAL and DOUBLE PRECISION
  51.     error functions (with x REAL and d DOUBLE PRECISION);
  52.     DERF must be declared DOUBLE PRECISION in your program.
  53.     Both ERF and DERF assume your C library provides the
  54.     underlying erf() function (which not all systems do).
  55.  
  56. 3.    ERFC(r) and DERFC(d) are the complementary error functions:
  57.     ERFC(r) = 1 - ERF(r) and DERFC(d) = 1.d0 - DERFC(d)
  58.     (except that their results may be more accurate than
  59.     explicitly evaluating the above formulae would give).
  60.     Again, ERFC and r are REAL, and DERFC and d are DOUBLE
  61.     PRECISION (and must be declared as such in your program),
  62.     and ERFC and DERFC rely on your system's erfc().
  63.  
  64. 4.    CALL GETARG(n,s), where n is an INTEGER and s is a CHARACTER
  65.     variable, sets s to the n-th command-line argument (or to
  66.     all blanks if there are fewer than n command-line arguments);
  67.     CALL GETARG(0,s) sets s to the name of the program (on systems
  68.     that support this feature).  See IARGC below.
  69.  
  70. 5.    CALL GETENV(name, value), where name and value are of type
  71.     CHARACTER, sets value to the environment value, $name, of
  72.     name (or to blanks if $name has not been set).
  73.  
  74. 6.    NARGS = IARGC() sets NARGS to the number of command-line
  75.     arguments (an INTEGER value).
  76.  
  77. 7.    CALL SIGNAL(n,func), where n is an INTEGER and func is an
  78.     EXTERNAL procedure, arranges for func to be invoked when
  79.     signal n occurs (on systems where this makes sense).
  80.  
  81. 8.    CALL SYSTEM(cmd), where cmd is of type CHARACTER, passes
  82.     cmd to the system's command processor (on systems where
  83.     this can be done).
  84.  
  85. The makefile does not attempt to compile pow_qq.c, which is meant
  86. for use with INTEGER*8.  To use it, you must modify f2c.h to
  87. declare longint appropriately; then add pow_qq.o to the POW =
  88. line in the makefile.
  89.  
  90. If you wish to allow the target of a (character string) concatenation
  91. to be appear on its right-hand (at the cost of extra overhead for
  92. all run-time concatenations), change "s_cat.o" to "s_catow.o" in
  93. the makefile.  Note that the Fortran 77 Standard explicitly forbids
  94. the target of a concatenation from appearing on its right-hand side.
  95.